package com.localcache.server.service;

import cn.hutool.core.util.StrUtil;

/**
 * TODO
 *
 * @author chennengcheng
 * @date 2022-09-06 15:19
 * @remark
 */
public class CacheDataInfo {
    // 应用名：
    private String applicationName;
    // 环境：
    private String activeProfile;
    // 机器名：
    private String ipAddress;
    // 业务模块名：
    private String modelPrefix;
    // 模块名：
    private String model;
    // 缓存大小
    private int size;
    // 缓存类
    private String cacheClassName;
    // 上次上报时间
    private long lastTime;
    // 状态
    private Boolean status;

    private String key;

    public void setKey(String key) {
        this.key = key;
    }

    public String getKey(){
        return applicationName + ":" + activeProfile + ":" + ipAddress + ":" + modelPrefix + ":" +
                model;
    }

    public String getApplicationName() {
        return applicationName;
    }

    public void setApplicationName(String applicationName) {
        this.applicationName = applicationName;
    }

    public String getIpAddress() {
        return ipAddress;
    }

    public void setIpAddress(String ipAddress) {
        this.ipAddress = ipAddress;
    }

    public String getModelPrefix() {
        return modelPrefix;
    }

    public void setModelPrefix(String modelPrefix) {
        this.modelPrefix = modelPrefix;
    }

    public String getCacheClassName() {
        return cacheClassName;
    }

    public void setCacheClassName(String cacheClassName) {
        this.cacheClassName = cacheClassName;
    }

    public String getModel() {
        return model;
    }

    public void setModel(String model) {
        this.model = model;
    }

    public int getSize() {
        return size;
    }

    public void setSize(int size) {
        this.size = size;
    }

    public long getLastTime() {
        return lastTime;
    }

    public void setLastTime(long lastTime) {
        this.lastTime = lastTime;
    }

    public Boolean getStatus() {
        return status;
    }

    public void setStatus(Boolean status) {
        this.status = status;
    }

    public String getActiveProfile() {
        return activeProfile;
    }

    public void setActiveProfile(String activeProfile) {
        this.activeProfile = activeProfile;
    }
}
